﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>LogIn</title>
    <link href="../Content/LogInCss.css" rel="stylesheet" />
</head>
<body>
    <div id="top"></div>
    <div id="in">
        <div id="LogInDiv">
            <img id="LoginImage" src="~/Image/title_login_2.png" />
            <div id="formDiv">
                <div>
                    <span style="letter-spacing:3px">会员名:</span>
                    <input type="text" id="name" placeholder="可包含a-z 0-9和下划线" />
                </div>
                <div>
                    <span style="letter-spacing:9px">密码:</span>
                    <input type="password" id="pwd" placeholder="至少包含6个字符" />
                </div>
                <div>
                    <button id="LoginBut"></button>
                </div>
            </div>
            <div id="ListUl">
                <ul>
                    <li>
                        <a href="#">什么是安全登录</a>
                    </li>
                    <li>
                        香港会员(繁体中文用户)<a href="#">由此登入</a>
                    </li>
                    <li>
                        <a href="#">密码安全贴士</a>
                    </li>
                    <li>
                        防止病毒或者木马窃取您的账户信息,<a href="#">在线检查</a>您的电脑是否安全
                    </li>
                </ul>
            </div>
        </div>
        <div id="inDiv"></div>
        <div id="RegisterDiv">
            <img id="RegisterImage" src="~/Image/register.gif" />
            <div id="RegisterDiv">
                <div id="Registerimg">
                    <div>
                        <img id="img01" src="../Image/icon.gif" />
                    </div>
                    <span>便宜有好货!</span>
                    <span style="color: black;font-weight:500;letter-spacing:0px;">超过7000万件商品任您选</span>
                </div>
                <div id="Registerimg">
                    <div>
                        <img id="img02" src="../Image/icon.gif" />
                    </div>
                    <span>买卖更安全!</span>
                    <span style="color: black;font-weight:500;letter-spacing:0px;">交易超安全</span>
                </div>
                <div id="Registerimg">
                    <div>
                        <img id="img03" src="../Image/icon.gif" />
                    </div>
                    <span>免费开网店!</span>
                    <span style="color: black;font-weight:500;letter-spacing:0px;">轻松赚钱交友</span>
                </div>
                <div id="Registerimg">
                    <div>
                        <img id="img04" src="../Image/icon.gif" />
                    </div>
                    <span>超人气社区!</span>
                    <span style="color: black;font-weight:500;letter-spacing:0px;">精彩活动每一天</span>
                </div>
            </div>
            <div>
                <div id="RegisterBut"></div>
            </div>
            <div id="RegisterBotton">
                <div id="RegisterBotton_01">
                    <div>
                        <img src="../Image/icon.gif" />
                    </div>
                    <span>您已经是会员了?<a href="~/Views/GMShop/LogIn.cshtml">由此登入</a></span>
                </div>
                <div id="RegisterBotton_02">
                    <div>
                        <img src="../Image/icon.gif" />
                    </div>
                    <span>繁体中文用户由此<a href="#">注册</a></span>
                </div>
            </div>
        </div>
    </div>
    <script src="~/Scripts/jquery-3.4.1.min.js"></script>
    <script>
        $(function () {
            $("#RegisterBut").click(function () {
                location = "/GMShop/Register";
            })

            $("#LoginBut").click(function () {
                //没有验证
                $.post("/GMShop/LogIn", { name: $("#name").val(), pwd: $("#pwd").val() }, function (data) {
                    alert(data.Massage);
                    if (data.State == 1) {
                        location = "/GMShop/Home";
                    }
                })
            })
        })
    </script>
</body>
</html>
